package cs.entity;

/**
 * Contains the message and its recipient or sender. <p>
 * Package  cs.entity
 * Project ChatSystemG1 - INSA 4INFOA1 - 2013/2014
 * @author Julie DUMONS & Juste OUEDRAOGO
 */
public class UserTextMessage {
	
	/**
	 * the remote user to whom this message is to be sent / received from
	 */
	private User remoteUser;
	
	/**
	 * message to be sent/received
	 */
	private String message;
	
	/**
	 * constructor
	 * @param remoteUser
	 * @param message
	 */

	public UserTextMessage(User remoteUser, String message) {
		super();
		this.remoteUser = remoteUser;
		this.message = message ;
	}

	/**
	 * Getter of remote user
	 * @return the remote user concern by this user text message
	 */
	public User getRemoteUser() {
		return remoteUser;
	}

	/**
	 * Set the remote user of this user text message
	 * @param remoteUser the remote user to set
	 */
	public void setRemoteUser(User remoteUser) {
		this.remoteUser = remoteUser;
	}

	/**
	 * get the message in String format of this UserTextMessage
	 * @return the message text
	 */
	public String getMessage() {
		return message;
	}
	
	/**
	 * set the message of this UserTextMessage
	 * @param message : the text to by replaced
	 */
	public void setMessage(String message) {
		this.message = ""+message;
	}
	

}
